package com.zhuxiaomei.mapper;

import com.zhuxiaomei.annotation.AutoFill;
import com.zhuxiaomei.entity.user.User;
import com.zhuxiaomei.enumeration.OperationType;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;


/**
 * @author hxm
 * @date 2024/12/8 13:24
 * @description
 */
public interface UserMapper extends Mapper<User> {

    @Select("select id, account, passwd, user_name, birthday, sex, avatar, balance from users where account = #{account}")
    User getUserByAccount(@Param("account") String account);

    @AutoFill(OperationType.INSERT)
    Integer registerUser(User registerUser);
}
